﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp6
{
    public enum CookRobot
    {
        西红柿炒鸡蛋,
        排骨汤
    }
    abstract class Robot
    {
        private string name;
        public string Name { get => name; set => name = value; }
        public Robot(string name)
        {
            this.Name = name;
        }
        abstract public void Working();
        class CookRobot : Robot
        {
            public CookRobot cook;
            public CookRobot Cook
            {
                get { return cook; }
                set { cook = value; }
            }
            public CookRobot(string name, CookRobot cook) : base(name)
            {
                this.Cook = cook;
            }
            public override void Working()
            {
                Console.WriteLine("我是{0},我在{1}", this.Name, this.cook);
            }
            class ChuanRobot : Robot
            {
                public string chuan;
                public string Chuan
                {
                    get { return chuan; }
                    set { chuan = value; }
                }
                public ChuanRobot(string name, string chuan) : base(name)
                {
                    this.Chuan = chuan;
                }
                public override void Working()
                {
                    Console.WriteLine("我是机器人{0},{1}", this.Name, this.chuan);
                }
            }
        }

    }

}
